module.exports = {
  framework: 'react',
  entry: {
    app: 'client/page/app/index.js',
  },
  buildPath: 'app/public',
  dll: [
    'react',
    'react-dom',
    'react-redux',
    'react-router-config',
    'react-router-dom',
    'react-router-redux',
    'redux',
  ],
  alias: {
    asset: 'client/asset',
    common: 'client/common',
    components: 'client/components',
    layout: 'client/layout',
    router: 'client/router',
    routes: 'client/routes',
    store: 'client/store',
    utils: 'client/utils',
    iconfont: 'client/asset/iconfont/iconfont.css',
    'iconfont.eot': 'client/asset/iconfont/iconfont.eot',
    'iconfont.ttf': 'client/asset/iconfont/iconfont.ttf',
    'iconfont.svg': 'client/asset/iconfont/iconfont.svg',
  },
  resolve: {
    extensions: [ '.js', '.jsx', '.less' ],
  },
  loaders: {
    babel: {
      test: /\.(js|jsx)?$/,
      exclude: [ /node_modules/ ],
      use: [{
        loader: 'babel-loader?cacheDirectory=true',
      },
      {
        loader: 'eslint-loader',
      },
      ],
    },
    // css: {
    //   options: {
    //     localIdentName: '[path][name]__[local]--[hash:base64:5]',
    //   },
    // },
    less: {
      options: {
        javascriptEnabled: true,
        modifyVars: {
          'primary-color': '#ff8000',
          'link-color': '#ff8000',
          'border-radius-base': '2px',
        },
      },
    },
  },
  plugins: {
    serviceworker: true,
  },
};
